<%@ page import="java.util.List" %>
<%@ page import="dataGateway.BidTable" %>
<%@ page import="domainLogic.Bid" %>
<%
	String itemIdSt = request.getParameter("itemId");
	if(itemIdSt == null)
	{
		out.println(common.JspUtil.makeErrorMsg("Invalid request!", common.JspUtil.URL_DEFAULT));
		return;
	}
%>

<h3>Bid List</h3>
<table border="2" cellpadding="3" cellspacing="0" style="border-collapse:collapse;" rules="rows" frame="hsides">
<tr>
	<td>user_id</td>
	<td>price</td>
	<td>bid date</td>
</tr>
<%
	int itemId = Integer.parseInt(itemIdSt);
	List<Bid> bids = BidTable.getInstance().getBidItemAll(itemId);
	for(Bid bid:bids)
	{
	%>
	<tr>
		<td><%=bid.getUserId()%></td>
		<td><%=bid.getPrice()%></td>
		<td><%=bid.getBiddate()%></td>
	</tr>
	<%
	}
%>
</table>

